import request from '@/utils/request'

// 新增企业认证
export function addCompanyCertification(data) {
  return request({
    url: '/ec/certification',
    method: 'post',
    data: data
  })
}

// 新增法人企业认证
export function addCompanyCertificationLegal(data) {
  return request({
    url: '/ec/certification/certCompany',
    method: 'post',
    data: data
  })
}

// 根据图片地址 ocr 数据
export function businessLicenseIdentify(data) {
  return request({
    url: '/ec/certification/businessLicenseIdentify',
    method: 'get',
    params: data
  })
}

// 根据姓名和手机号进行转交认证
export function certForword(data) {
  return request({
    url: '/ec/certification/certForword',
    method: 'get',
    params: data
  })
}

// 查询转交记录
export function getCertForWordLog(companyId) {
  return request({
    url: '/ec/certification/getCertForWordLog',
    method: 'get',
    params: {companyId:companyId}
  })
}

// 转交管理员重新发送
export function againSendMsgForWord(mobile) {
  return request({
    url: '/ec/certification/againSendMsgForWord',
    method: 'get',
    params: {mobile:mobile}
  })
}

// 根据企业id 查询企业认证信息
export function getInfoByCompanyId(companyId) {
  return request({
    url: '/ec/certification/companyId/'+companyId,
    method: 'get',
  })
}

// 根据企业id 查询企业认证信息
export function genLegalCert(companyId,legalPersonIdNumber) {
  return request({
    url: '/ec/genLegalCert/'+companyId+"/"+legalPersonIdNumber,
    method: 'get',
  })
}
